package com.zhn.evsi.controller.Evsi;

import com.zhn.evsi.common.Result;
import com.zhn.evsi.service.IEvsiAllianceService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "联盟管理模块")
@ApiSort(value = 6)
@RestController
@RequestMapping("/evsi/alliance")
public class EvsiAllianceController {

    @Autowired
    private IEvsiAllianceService allianceService;

    @ApiOperation(value = "联盟列表")
    @ApiOperationSupport(order = 1)
    @GetMapping("/allianceList")
    public Result allianceList() {
        return Result.success(allianceService.allianceList());
    }

    @ApiOperation(value = "获取联盟详情")
    @ApiOperationSupport(order = 2)
    @GetMapping("/alliancesInfo")
    public Result alliancesInfo(@RequestParam Integer allianceId) {
        return Result.success(allianceService.alliancesInfo(allianceId));
    }

    @ApiOperation(value = "获取联盟下属军团id")
    @ApiOperationSupport(order = 3)
    @GetMapping("/allianceCorporations")
    public Result allianceCorporations(@RequestParam Integer allianceId) {
        return Result.success(allianceService.allianceCorporations(allianceId));
    }

    @ApiOperation(value = "获取联盟图标")
    @ApiOperationSupport(order = 4)
    @GetMapping("/allianceIcon")
    public Result allianceIcon(@RequestParam Integer allianceId) {
        return Result.success(allianceService.allianceIcon(allianceId));
    }


}
